| # Remote Object Activation | Documentation Comments

Prior to the release of the JavaTM 2 SDK, an instance of a `UnicastRemoteObject` could be accessed from a program that (1) created an instance of the remote object, and (2) ran all the time. Now with the introduction of the class `java.rmi.activation.Activatable` and the RMI daemon, `rmid`, programs can be written to register information about remote object implementations that should be created and execute "on demand", rather than running all the time. The RMI daemon, `rmid`, provides a Java virtual machine* (JVM) from which other JVM instances may be spawned.

Starting out with activation
None of the activation tutorials should be the first material you read on RMI. If you have never used RMI before, you should take a look at Getting Started before you try these. The first three activation tutorials are intended for developers who have had some experience developing Java programs that access remote objects by means of the RMI classes provided as part of the Java 2 SDK.

- Creating an Activatable Object
This tutorial illustrates the process of creating a new class that extends `java.rmi.activation.Activatable`.
- Making a UnicastRemoteObject Activatable
This tutorial takes you through the process of moving an existing remote object implementation, that extends `UnicastRemoteObject`, to a class that extends `java.rmi.activation.Activatable`.
- Activating an object that does not extend java.rmi.activation.Activatable

This tutorial shows you how to use the static method `Activatable.exportObject` in the constructor of a class that does not extend from `Activatable`, and how to create a remote interface, based on the methods that should be made available to remote clients.

Going further with activation
This next tutorial on using a `MarshalledObject` is intended for developers who have gone through at least one of the first three activation tutorials. More tutorials may be added to this section in a future release, based on your feedback.

- Using a MarshalledObject to create persistent data

For all of the source code used in the activation tutorials, you may choose from these formats:

- activation.zip
- activation.tar
- activation.tar.Z

For more information on object activation, you can also refer to the RMI Specification.

We are very interested in knowing whether these tutorials are useful. Please send any comments or suggestions to: rmi-comments@java.sun.com, with a subject of "activation tutorials". *As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 2001 Sun Microsystems, Inc. All Rights Reserved. Please send comments to: rmi-comments@java.sun.com |